import { S } from '../../s';
import { IPSDEUILogic } from './ipsdeuilogic';
import { IPSDEUILogicParam } from './ipsdeuilogic-param';
import { IPSDEUIThrowExceptionLogic } from './ipsdeuithrow-exception-logic';
import { PSDEUILogicNodeImpl } from './psdeuilogic-node-impl';

export class PSDEUIThrowExceptionLogicImpl
  extends PSDEUILogicNodeImpl
  implements IPSDEUIThrowExceptionLogic
{
  get errorCode(): number {
    return this.M.errorCode;
  }

  get errorInfo(): string {
    return this.M.errorInfo;
  }

  get exceptionObj(): string {
    return this.M.exceptionObj;
  }

  protected exceptionparam: IPSDEUILogicParam;
  getExceptionParam(): IPSDEUILogicParam | null {
    if (this.exceptionparam != null) return this.exceptionparam;
    const value = this.M.getExceptionParam;
    if (value == null) {
      return;
    }
    const ipsdeuilogic = this.getParentPSModelObject(S._206) as IPSDEUILogic;
    if (ipsdeuilogic != null) {
      this.exceptionparam = ipsdeuilogic.findPSDEUILogicParam(value);
    }
    return this.exceptionparam;
  }
  get cls(): string {
    return 'PSDEUIThrowExceptionLogicImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._389) return true;
    return super.instanceof(cls);
  }
}
